home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / tcp_ip / ntp_src / readme.ntp < prev   
Text File  |  1992-04-03  |  4KB  |  95 lines

  1. NTP for NOS
  2.  
  3. This is a port of Dennis Ferguson's xntp to run under Phil Karn's NOS
  4. for the PC.  Thanks and kudos to both of them for writing software
  5. amenable to such a graft.
  6.  
  7. Things that I have or have not done:
  8.  
  9. The changes to NOS for NTP to run are relatively minor.  The changes
  10. to the xntp source are much more significant, though I have tried to
  11. leave xntp alone as much as possible to simplify the incorporation of
  12. any future updates to xntp.  ntp_unixclock.c has been replaced by
  13. ntp_pcclock.c.  ntp_io.c, ntp_timer.c and ntp_config.c have been
  14. almost entirely rewritten, and most of the functions that were in
  15. xntp's utility library have instead been dropped into ntp_util.c.  The
  16. other source files have been changed to use different include files
  17. and to schedule timers differently.
  18.  
  19. The code to handle authentication, monitoring, and NTP mode 7 packets
  20. has not been included.  All references to these parts of xntp have
  21. been #ifdef'd out, and the source files specific to these functions
  22. have been omitted from the NTP under NOS distribution.  I have no
  23. reason to believe that they would be difficult to port, but I
  24. haven't felt the need for them yet and ntp is large enough as is.
  25.  
  26. The code to handle and reply to NTP mode 6 packets *is* included.  It
  27. has been conditionalized so that it could be excluded if desired
  28. (though not tested this way).  Mode 6 packets are the only way to see
  29. what ntp is doing under NOS.  I have not included any mechanism for
  30. examining what ntp is doing from NOS' command line.  (Except for
  31. turning on debugging printfs.)  I run ntpq on a Unix box and probe the
  32. PC over the network.
  33.  
  34. This version of xntp does not read its own configuration file.
  35. Instead, each ntp command line typed to NOS is parsed by xntp's
  36. configuration-file-reading code.  I did it this way because I needed
  37. NTP to run under a port of NOS that cannot do disk accesses (don't
  38. ask).  For the same reason, this version of xntp does not write a
  39. drift file.
  40.  
  41. What is included in this tar file:
  42.  
  43. diff.ntp:  context diffs to the 910614 distribution of NOS.
  44. ntp*.[ch]:  The modified xntp source files that are needed.
  45.  
  46. To compile NTP into NOS, you'll have to edit config.h by hand to
  47. #define NTP.
  48.  
  49. To run NTP:
  50.  
  51. First find some peers.  You're on your own for this.  The file
  52. louie.udel.edu:pub/ntp/clock.txt lists some primary servers.  You
  53. should probably try to find peers other than the primary servers to
  54. avoid thousands of PCs blasting away at the primary servers.
  55.  
  56. To start NTP, put something like the following in autoexec.net:
  57.     ntp peer somehost
  58.     ntp peer someotherhost
  59.     ntp precision -20
  60. If you don't have an AT or better, your precision value will be much
  61. worse (I don't know how well NTP will work with such low-precision
  62. time stamps):
  63.     ntp precision -4
  64. If you do have an AT or better, make sure that NOS knows this by
  65. giving it the "isat on" command.
  66.  
  67. Nosxntp should be run at least for overnight to let it figure out what the
  68. drift value is for your particular PC.  Typing "ntp drift" to NOS will
  69. print out the drift value.  When it has more-or-less stopped changing,
  70. you can put the command to set the drift value into autoexec.net:
  71.     ntp drift -0.158        (for example)
  72.  
  73. Nosxntp initializes its idea of the time from DOS.  DOS' time must be
  74. within a thousand seconds of the actual time, otherwise nosxntp will
  75. think that things are too far gone and give up.  Nosxntp will take at
  76. least a half hour or so to approach the correct time *if* you have
  77. initialized the drift (it will get to within a hundred milliseconds or
  78. so fairly quickly).  Otherwise, be prepared to wait a day or so.
  79.  
  80. Nosxntp running on a genuine AT (ie 8MHz '286) sitting idle in a
  81. corner keeps time to within a couple milliseconds of a peer sitting on
  82. the same ethernet.  The accuracy goes down as the amount of activity
  83. on the PC increases.  This is because NTP depends on symmetric delays
  84. to and from the peer.  Since NOS is not preemptive, if other processes
  85. are running then NTP packets may wait on the Hopper for an
  86. unpredictable time, making the outbound and inbound delays different.
  87.  
  88. Please report any bugs to me.  Note that this code is (at best) a beta
  89. release.  (Not xntp or NOS, but my port of the first to the second.  I
  90. have not yet found any bugs in the parts of xntp that I haven't
  91. touched.)
  92.  
  93. Andrew Heybey
  94. ath@ptt.lcs.mit.edu
  95.